package com.example.tellwin.base;

/**
 * Created by DuoNuo on 2017/9/21.
 */
public abstract class SimpleCallback<T> {

    private BaseContract.BaseView mView;

    public SimpleCallback(BaseContract.BaseView mView) {
        this.mView = mView;
    }

    public void onLoading(){
        if(mView!=null){
            mView.onLoading();
        }
    }
    public abstract void onSuccess(T t);
    public void onComplete(){
        if(mView!=null){
            mView.complete();
        }
    }
    public abstract void onFail(String msg);
    public void onHttpError(String msg){
        if(mView!=null){
            mView.showError();
        }
    };

}
